#ifndef GAMEBOARD_H
#define GAMEBOARD_H

#include <QGraphicsView>
#include <QGraphicsScene>
#include <QGraphicsEllipseItem>

class GameBoard : public QGraphicsView {
    Q_OBJECT
public:
    explicit GameBoard(QWidget *parent = nullptr);
    void movePlayer(int position);  // 新增公共方法

private:
    QGraphicsScene *scene;
    QGraphicsEllipseItem *player;  // 将player声明为成员变量
    void initBoard();
};

#endif // GAMEBOARD_H
